<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div>
  <audio autoplay controls id="audioplayer"></audio>
</div>
<script src="../utils/utils.js"></script>
<script>
  'use strict'
  var $audioplayer = $('#audioplayer')

  function gotMediaStream (stream) {
    $audioplayer.srcObject = stream
  }

  function start () {
    navigator.mediaDevices.getUserMedia({ video: false, audio: true })
      .then(gotMediaStream)
      .catch(handleError)
  }

  start ()

</script>
</body>
</html>
